Skip to content

docs: align agent example format with official Claude Code documentation#119

Merged
sjnims merged 1 commit intomainfrom
docs/117-align-agent-example-format
Dec 11, 2025
Merged

docs: align agent example format with official Claude Code documentation#119
sjnims merged 1 commit intomainfrom
docs/117-align-agent-example-format

Conversation

@sjnims
Copy link
Copy Markdown
Owner

@sjnims sjnims commented Dec 11, 2025

Summary

  • Aligns all <example> blocks in agent development documentation and agents with the official Claude Code documentation format
  • Updates template and examples in triggering-examples.md
  • Updates documented template format in agent-creator.md
  • Converts two-assistant-line examples to single-assistant-line format in all 3 agents

Problem

Fixes #117

The plugin's internal documentation and agents were using a two-assistant-line example format that differed from the official Claude Code documentation:

Aspect Official Docs This Plugin (Before)
Assistant lines 1 (invocation only) 2 (response + invocation)
Commentary position After invocation Between responses

Solution

Aligned all examples with the official format:

  • Single assistant line showing the agent invocation
  • Commentary positioned after the assistant line

Files Changed

File Changes
triggering-examples.md Updated format template and all example types (Type 2, 3, 4, Template Library)
agent-creator.md Updated documented template format
plugin-validator.md Converted Examples 1, 3, 4 to single-line format
skill-reviewer.md Converted Example 1 to single-line format

Alternatives Considered

Documenting the intentional difference rather than aligning was considered, but alignment with official documentation was chosen for:

  1. Consistency with official Claude Code patterns
  2. Reduced cognitive load for users referencing both sources
  3. Simpler format that's sufficient for demonstrating triggers

Testing

  • All modified files pass markdownlint
  • Examples follow official format structure
  • No broken references

🤖 Generated with Claude Code

Update example blocks across agent development documentation and all 3 agents
to use the official Claude Code single-assistant-line format with commentary
positioned after the assistant invocation line.

Key changes:
- triggering-examples.md: Updated template and all example types
- agent-creator.md: Updated documented template format
- plugin-validator.md: Converted 3 examples to single-line format
- skill-reviewer.md: Converted 1 example to single-line format

The official format uses:
- Single assistant line (invocation only)
- Commentary positioned after the invocation

Fixes #117

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Dec 11, 2025

Claude finished @sjnims's task in 1m 22s —— View job


PR Review Complete

Summary

Assessment: ✅ Looks good - well-executed alignment with official documentation

This PR successfully aligns all agent examples with the official Claude Code documentation format. The changes are consistent, well-documented, and improve clarity.


What's Good

  1. Consistency with Official Docs: All examples now follow the single-assistant-line format matching official Claude Code documentation, reducing cognitive load for users who reference both sources.

  2. Comprehensive Coverage: Updated all relevant files:

    • Core reference documentation (triggering-examples.md)
    • Agent template documentation (agent-creator.md)
    • All 3 existing agents (plugin-validator.md, skill-reviewer.md)
  3. Net Simplification: Reduced line count (-65/+29 lines) while maintaining clarity by removing redundant assistant response lines.

  4. Clean Markdown: All 4 changed files pass markdownlint with zero errors.

  5. Well-Documented PR: Clear explanation in PR description with comparison table showing the format difference.


Detailed Review

File: triggering-examples.md (+23/-54)

Changes: Updated format template and all example types throughout the reference documentation.

Positive aspects:

  • Line 7: Updated format template now matches official docs exactly
  • Lines 65-69: Consolidated assistant response section from two subsections into one
  • Lines 120-406: All template library examples converted consistently
  • Commentary positioning is now consistent (after assistant line)

Quality: Excellent - the reference documentation now serves as an accurate template for creating new agents.

File: agent-creator.md (+2/-3)

Changes: Updated the documented template format in the agent creation instructions.

Positive aspects:

  • Lines 72, 88: Template now shows single assistant line format
  • Maintains alignment between what the agent teaches and official documentation

Quality: Good - ensures new agents created by this agent will follow the correct format.

File: plugin-validator.md (+3/-6)

Changes: Converted Examples 1, 3, and 4 to single-line format.

Review:

  • Line 8: Example 1 - ✅ Clean conversion, commentary flows well
  • Line 26: Example 3 - ✅ Good, more concise now
  • Line 35: Example 4 - ✅ Works well

Quality: Excellent - all examples are clear and follow the pattern.

File: skill-reviewer.md (+1/-2)

Changes: Converted Example 1 to single-line format.

Review:

  • Line 8: ✅ Clean conversion maintaining the proactive triggering emphasis in commentary

Quality: Good - example remains clear and effective.


Markdown Linting

PASS - All 4 files pass markdownlint with zero errors:

markdownlint --config .markdownlint.json \
  plugins/plugin-dev/agents/agent-creator.md \
  plugins/plugin-dev/agents/plugin-validator.md \
  plugins/plugin-dev/agents/skill-reviewer.md \
  plugins/plugin-dev/skills/agent-development/references/triggering-examples.md

No output = no issues detected.


Checklist Verification

  • Agent format: All <example> blocks follow official Claude Code format
  • YAML frontmatter: No changes to frontmatter - all intact and valid
  • Consistency: Format applied uniformly across all files
  • Documentation quality: Changes improve clarity and alignment
  • No broken references: All file paths and references remain valid
  • Markdown quality: Zero linting errors

Suggestions

None - This PR is clean and ready to merge.

The format alignment is appropriate and well-executed. The single-assistant-line format is sufficient for demonstrating trigger conditions and reduces unnecessary verbosity.


Recommendation

✅ Approve and merge - This PR successfully achieves its stated goal of aligning with official documentation while maintaining quality and consistency across all affected files.

@sjnims sjnims self-assigned this Dec 11, 2025
@claude claude Bot added documentation Improvements or additions to documentation component:agent Agents layer component:skill Skills layer effort:medium 1-4 hours labels Dec 11, 2025
@sjnims sjnims merged commit 3ac8d5b into main Dec 11, 2025
8 checks passed
@sjnims sjnims deleted the docs/117-align-agent-example-format branch December 11, 2025 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:agent Agents layer component:skill Skills layer documentation Improvements or additions to documentation effort:medium 1-4 hours

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Agent example format differs from official Claude Code documentation

1 participant